<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>管理员页面</title>
    <link rel="stylesheet" href="/static/css/admin.css"/>
    <link rel="stylesheet" href="/static/css/amazeui.min.css">
    <link rel="stylesheet" href="/static/css/app.css">
    <link rel="stylesheet" href="/static/css/layui.css">
</head>

<body data-type="generalComponents">
<!--------------------top1------------------>
<header class="am-topbar am-topbar-inverse admin-header">

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <!-------个人中心-------------------->
            {% if admin_name and admin_face %}
                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="tpl-header-list-user-nick">{{ admin_name }}</span><span
                            class="tpl-header-list-user-ico">
                      <img src="{{ admin_face }}">
                    </span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li>
                            <a href="#"><span class="am-icon-bell-o"></span> 资料</a>
                        </li>
                        <li>
                            <a href="#"><span class="am-icon-cog"></span> 设置</a>
                        </li>
                        <li>
                            <a href="/admin/adminLogout"><span class="am-icon-power-off"></span> 退出</a>
                        </li>
                    </ul>
                </li>
            {% else %}
                <li class="am-dropdown">
                    <a href="/admin/adminLogin"><p style="color: #0a628f">登录</p></a>
                </li>
            {% endif %}
            <!-------个人中心------------------------------------------>
            <li style="margin-right: 40px;"></li>
        </ul>
    </div>
</header>
<!---------------header-------------------------->
<!---    左侧导航栏---------------->
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover">
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <li class="tpl-left-nav-item">
                    <a href="index.html" class="nav-link ">
                        <i class="am-icon-home"></i>
                        <span>首页</span>
                    </a>
                </li>
                <li class="tpl-left-nav-item">
                    <a href="/admin/addFindGoodItem/" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-bar-chart"></i>
                        <span>失物招领</span>
                        <span id="msgCount"></span>
                    </a>
                </li>
                <li class="tpl-left-nav-item">
                    <a href="/school/schoolNewsList/" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-bar-chart"></i>
                        <span>校园新闻</span>
                        <span id="msgCount"></span>
                    </a>
                </li>
                <li class="tpl-left-nav-item">
                    <a href="/admin/manageUser" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-wpforms"></i>
                        <span>查看所有用户</span>
                    </a>
                </li>

                <li class="tpl-left-nav-item">
                    <a href="/admin/adminLogin" class="nav-link tpl-left-nav-link-list">
                        <i class="am-icon-key"></i>
                        <span>登录</span>

                    </a>
                </li>

            </ul>
        </div>
    </div>
    <!---    左侧导航栏---------------->
    <div class="tpl-content-wrapper">
        <textarea name="violate" value="" id="violate" style="width: 1080px;height: 400px">
            {{ violate }}
        </textarea>
        <br>
        <input type="button" class="layui-btn" value="保存修改" onclick="SaveViolate()" style="margin-top: 10px;margin-left: 900px">
    </div>
</div>

<script src="/static/js/jquery-3.3.1.js"></script>
<script src="/static/js/amazeui.min.js"></script>
<script src="/static/js/app.js"></script>
<script type="text/javascript">
    function SaveViolate() {
        var violate=$('#violate').val()
        var data = {"violate": violate};
        console.log(violate);
        $.ajax({
            type: "get",
            data: data,
            url: '/admin/saveViolate/',
            dataType: 'json',
            success: function (result) {
                if (result.Code == 200) {
                    alert("修改成功！")
                    location.href = "/admin/adminViolate/"
                }
            },
            error: function (result) {
                alert("系统异常！")
            }
        });
    }
</script>
</body>

</html>